import.meta.env = {
  VITE_BASE_URL: "http://39.103.151.139:8000",
  BASE_URL: "/",
  MODE: "development",
  DEV: true,
  PROD: false,
  SSR: false,
};
import axios from "/node_modules/.vite/deps/axios.js?v=0b9a7925";
const request = axios.create({
  method: "get",
  baseURL: import.meta.env.VITE_BASE_URL,
  timeout: 5000,
});
request.interceptors.request.use(
  (req) => {
    return req;
  },
  (err) => {
    return Promise.reject(err);
  }
);
request.interceptors.response.use(
  (res) => {
    if (res.status === 200) {
      return res.data;
    } else {
      res.errMsg = "数据响应失败";
      return Promise.reject(res);
    }
  },
  (err) => {
    return Promise.reject(err);
  }
);
export default request;
